#ifndef ASCE_FILE_H_
#define ASCE_FILE_H_
#include <stdio.h>
#include <string>
#include "asce_config.h"
#include "uncopyable.h"

namespace asce
{
	class File : public UnCopyable
	{
	public:
		File();
		~File();

	public:
		bool	Open(const std::string& path);
		void	Close();
		int		Write(const char* buffer, int length);
		int		Read(char* buffer, int length);

	public:
		uint32	length() const { return length_; }
		bool	valid() const { return NULL != file_; }
		
	private:
		FILE*	file_;
		uint32	length_;
	};
}

#endif